<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>CANopenNode: CAN errors &amp; Log</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">CANopenNode
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__CO__socketCAN__ERROR.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#files">Files</a> &#124;
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">CAN errors &amp; Log<div class="ingroups"><a class="el" href="group__CO__socketCAN.html">socketCAN</a></div></div>  </div>
</div><!--header-->
<div class="contents">

<p>CANopen Errors and System message log.  
<a href="#details">More...</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="files"></a>
Files</h2></td></tr>
<tr class="memitem:CO__error_8h"><td class="memItemLeft" align="right" valign="top">file &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="CO__error_8h.html">CO_error.h</a></td></tr>
<tr class="memdesc:CO__error_8h"><td class="mdescLeft">&#160;</td><td class="mdescRight">CANopenNode Linux socketCAN Error handling. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structCO__CANinterfaceErrorhandler__t.html">CO_CANinterfaceErrorhandler_t</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">socketCAN interface error handling  <a href="structCO__CANinterfaceErrorhandler__t.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ga85f1fa06be5e9a8337e1ec86546ea72d"><td class="memItemLeft" align="right" valign="top"><a id="ga85f1fa06be5e9a8337e1ec86546ea72d"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__socketCAN__ERROR.html#ga85f1fa06be5e9a8337e1ec86546ea72d">CO_CANerror_NOACK_MAX</a>&#160;&#160;&#160;16</td></tr>
<tr class="memdesc:ga85f1fa06be5e9a8337e1ec86546ea72d"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is how many NO-ACKs need to be received in a row to assume that no other nodes are connected to a bus and therefore are assuming listen-only. <br /></td></tr>
<tr class="separator:ga85f1fa06be5e9a8337e1ec86546ea72d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga02f9c19a953d2bd9005033c35c2cb6de"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__socketCAN__ERROR.html#ga02f9c19a953d2bd9005033c35c2cb6de">CO_CANerror_LISTEN_ONLY</a>&#160;&#160;&#160;10</td></tr>
<tr class="memdesc:ga02f9c19a953d2bd9005033c35c2cb6de"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is how long we are going to block transmission if listen-only mode is active.  <a href="#ga02f9c19a953d2bd9005033c35c2cb6de">More...</a><br /></td></tr>
<tr class="separator:ga02f9c19a953d2bd9005033c35c2cb6de"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:ga7bf6a56766c008531d32b4218a5a9061"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__socketCAN__ERROR.html#ga7bf6a56766c008531d32b4218a5a9061">CO_CANinterfaceState_t</a> { <a class="el" href="group__CO__socketCAN__ERROR.html#gga7bf6a56766c008531d32b4218a5a9061ad22fcb069e808548dee28e4aae580c1a">CO_INTERFACE_ACTIVE</a>, 
<a class="el" href="group__CO__socketCAN__ERROR.html#gga7bf6a56766c008531d32b4218a5a9061a9b74584a321fe8a89cf74e087b094581">CO_INTERFACE_LISTEN_ONLY</a>, 
<a class="el" href="group__CO__socketCAN__ERROR.html#gga7bf6a56766c008531d32b4218a5a9061a8e51897ec66a9b37865659bbc348e212">CO_INTERFACE_BUS_OFF</a>
 }<tr class="memdesc:ga7bf6a56766c008531d32b4218a5a9061"><td class="mdescLeft">&#160;</td><td class="mdescRight">driver interface state  <a href="group__CO__socketCAN__ERROR.html#ga7bf6a56766c008531d32b4218a5a9061">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:ga7bf6a56766c008531d32b4218a5a9061"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gac9aeec86e89e5525b4e13e3b1e21866d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__socketCAN__ERROR.html#gac9aeec86e89e5525b4e13e3b1e21866d">log_printf</a> (int priority, const char *format,...)</td></tr>
<tr class="memdesc:gac9aeec86e89e5525b4e13e3b1e21866d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Message logging function.  <a href="#gac9aeec86e89e5525b4e13e3b1e21866d">More...</a><br /></td></tr>
<tr class="separator:gac9aeec86e89e5525b4e13e3b1e21866d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga30c3cb98d37aedf45d49643064fee4cd"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__socketCAN__ERROR.html#ga30c3cb98d37aedf45d49643064fee4cd">CO_CANerror_init</a> (<a class="el" href="structCO__CANinterfaceErrorhandler__t.html">CO_CANinterfaceErrorhandler_t</a> *CANerrorhandler, int fd, const char *ifname)</td></tr>
<tr class="memdesc:ga30c3cb98d37aedf45d49643064fee4cd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Initialize CAN error handler.  <a href="#ga30c3cb98d37aedf45d49643064fee4cd">More...</a><br /></td></tr>
<tr class="separator:ga30c3cb98d37aedf45d49643064fee4cd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga6a74902a35f8a260cdc3956b83c17c77"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__socketCAN__ERROR.html#ga6a74902a35f8a260cdc3956b83c17c77">CO_CANerror_disable</a> (<a class="el" href="structCO__CANinterfaceErrorhandler__t.html">CO_CANinterfaceErrorhandler_t</a> *CANerrorhandler)</td></tr>
<tr class="memdesc:ga6a74902a35f8a260cdc3956b83c17c77"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reset CAN error handler.  <a href="#ga6a74902a35f8a260cdc3956b83c17c77">More...</a><br /></td></tr>
<tr class="separator:ga6a74902a35f8a260cdc3956b83c17c77"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5d5ee1aac31cf0334108cd147b9c9038"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__socketCAN__ERROR.html#ga5d5ee1aac31cf0334108cd147b9c9038">CO_CANerror_rxMsg</a> (<a class="el" href="structCO__CANinterfaceErrorhandler__t.html">CO_CANinterfaceErrorhandler_t</a> *CANerrorhandler)</td></tr>
<tr class="memdesc:ga5d5ee1aac31cf0334108cd147b9c9038"><td class="mdescLeft">&#160;</td><td class="mdescRight">Message received event.  <a href="#ga5d5ee1aac31cf0334108cd147b9c9038">More...</a><br /></td></tr>
<tr class="separator:ga5d5ee1aac31cf0334108cd147b9c9038"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gac40e1c681a9721c91ed75c49afda913c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__CO__socketCAN__ERROR.html#ga7bf6a56766c008531d32b4218a5a9061">CO_CANinterfaceState_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__socketCAN__ERROR.html#gac40e1c681a9721c91ed75c49afda913c">CO_CANerror_txMsg</a> (<a class="el" href="structCO__CANinterfaceErrorhandler__t.html">CO_CANinterfaceErrorhandler_t</a> *CANerrorhandler)</td></tr>
<tr class="memdesc:gac40e1c681a9721c91ed75c49afda913c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if interface is ready for message transmission.  <a href="#gac40e1c681a9721c91ed75c49afda913c">More...</a><br /></td></tr>
<tr class="separator:gac40e1c681a9721c91ed75c49afda913c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga975e329593af25c4467f3ddde5cf5f5c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__CO__socketCAN__ERROR.html#ga7bf6a56766c008531d32b4218a5a9061">CO_CANinterfaceState_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__CO__socketCAN__ERROR.html#ga975e329593af25c4467f3ddde5cf5f5c">CO_CANerror_rxMsgError</a> (<a class="el" href="structCO__CANinterfaceErrorhandler__t.html">CO_CANinterfaceErrorhandler_t</a> *CANerrorhandler, const struct can_frame *msg)</td></tr>
<tr class="memdesc:ga975e329593af25c4467f3ddde5cf5f5c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Error message received event.  <a href="#ga975e329593af25c4467f3ddde5cf5f5c">More...</a><br /></td></tr>
<tr class="separator:ga975e329593af25c4467f3ddde5cf5f5c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>CANopen Errors and System message log. </p>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a id="ga02f9c19a953d2bd9005033c35c2cb6de"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga02f9c19a953d2bd9005033c35c2cb6de">&#9670;&nbsp;</a></span>CO_CANerror_LISTEN_ONLY</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define CO_CANerror_LISTEN_ONLY&#160;&#160;&#160;10</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This is how long we are going to block transmission if listen-only mode is active. </p>
<p>Time is in seconds. </p>

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="ga7bf6a56766c008531d32b4218a5a9061"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga7bf6a56766c008531d32b4218a5a9061">&#9670;&nbsp;</a></span>CO_CANinterfaceState_t</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group__CO__socketCAN__ERROR.html#ga7bf6a56766c008531d32b4218a5a9061">CO_CANinterfaceState_t</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>driver interface state </p>
<p>CAN hardware can be in the followning states:</p><ul>
<li>error active (OK)</li>
<li>error passive (Can't generate error flags)</li>
<li>bus off (no influence on bus) </li>
</ul>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="gga7bf6a56766c008531d32b4218a5a9061ad22fcb069e808548dee28e4aae580c1a"></a>CO_INTERFACE_ACTIVE&#160;</td><td class="fielddoc"><p>CAN error passive/active. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga7bf6a56766c008531d32b4218a5a9061a9b74584a321fe8a89cf74e087b094581"></a>CO_INTERFACE_LISTEN_ONLY&#160;</td><td class="fielddoc"><p>CAN error passive/active, but currently no other device on bus. </p>
</td></tr>
<tr><td class="fieldname"><a id="gga7bf6a56766c008531d32b4218a5a9061a8e51897ec66a9b37865659bbc348e212"></a>CO_INTERFACE_BUS_OFF&#160;</td><td class="fielddoc"><p>CAN bus off. </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="ga6a74902a35f8a260cdc3956b83c17c77"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga6a74902a35f8a260cdc3956b83c17c77">&#9670;&nbsp;</a></span>CO_CANerror_disable()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CO_CANerror_disable </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__CANinterfaceErrorhandler__t.html">CO_CANinterfaceErrorhandler_t</a> *&#160;</td>
          <td class="paramname"><em>CANerrorhandler</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Reset CAN error handler. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">CANerrorhandler</td><td>CAN error object. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga30c3cb98d37aedf45d49643064fee4cd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga30c3cb98d37aedf45d49643064fee4cd">&#9670;&nbsp;</a></span>CO_CANerror_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CO_CANerror_init </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__CANinterfaceErrorhandler__t.html">CO_CANinterfaceErrorhandler_t</a> *&#160;</td>
          <td class="paramname"><em>CANerrorhandler</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>fd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>ifname</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Initialize CAN error handler. </p>
<p>We need one error handler per interface</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">CANerrorhandler</td><td>This object will be initialized. </td></tr>
    <tr><td class="paramname">fd</td><td>interface file descriptor </td></tr>
    <tr><td class="paramname">ifname</td><td>interface name as string </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga5d5ee1aac31cf0334108cd147b9c9038"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga5d5ee1aac31cf0334108cd147b9c9038">&#9670;&nbsp;</a></span>CO_CANerror_rxMsg()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void CO_CANerror_rxMsg </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__CANinterfaceErrorhandler__t.html">CO_CANinterfaceErrorhandler_t</a> *&#160;</td>
          <td class="paramname"><em>CANerrorhandler</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Message received event. </p>
<p>When a message is received at least one other CAN module is connected. Function clears listenOnly and noackCounter error flags.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">CANerrorhandler</td><td>CAN error object. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ga975e329593af25c4467f3ddde5cf5f5c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ga975e329593af25c4467f3ddde5cf5f5c">&#9670;&nbsp;</a></span>CO_CANerror_rxMsgError()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__CO__socketCAN__ERROR.html#ga7bf6a56766c008531d32b4218a5a9061">CO_CANinterfaceState_t</a> CO_CANerror_rxMsgError </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__CANinterfaceErrorhandler__t.html">CO_CANinterfaceErrorhandler_t</a> *&#160;</td>
          <td class="paramname"><em>CANerrorhandler</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const struct can_frame *&#160;</td>
          <td class="paramname"><em>msg</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Error message received event. </p>
<p>This handles all received error messages.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">CANerrorhandler</td><td>CAN error object. </td></tr>
    <tr><td class="paramname">msg</td><td>received error message </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__CO__socketCAN__ERROR.html#ga7bf6a56766c008531d32b4218a5a9061" title="driver interface state ">CO_CANinterfaceState_t</a> </dd></dl>

</div>
</div>
<a id="gac40e1c681a9721c91ed75c49afda913c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac40e1c681a9721c91ed75c49afda913c">&#9670;&nbsp;</a></span>CO_CANerror_txMsg()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__CO__socketCAN__ERROR.html#ga7bf6a56766c008531d32b4218a5a9061">CO_CANinterfaceState_t</a> CO_CANerror_txMsg </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structCO__CANinterfaceErrorhandler__t.html">CO_CANinterfaceErrorhandler_t</a> *&#160;</td>
          <td class="paramname"><em>CANerrorhandler</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Check if interface is ready for message transmission. </p>
<p>Message mustn't be transmitted if not ready.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">CANerrorhandler</td><td>CAN error object. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>CO_INTERFACE_ACTIVE message transmission ready </dd></dl>

</div>
</div>
<a id="gac9aeec86e89e5525b4e13e3b1e21866d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#gac9aeec86e89e5525b4e13e3b1e21866d">&#9670;&nbsp;</a></span>log_printf()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void log_printf </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>priority</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>format</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>...</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Message logging function. </p>
<p>Function must be defined by application. It should record log message to some place, for example syslog() call in Linux or logging functionality in CANopen gateway <a class="el" href="group__CO__CANopen__309__3.html">ASCII mapping</a>.</p>
<p>By default system stores messages in /var/log/syslog file. Log can optionally be configured before, for example to filter out less critical errors than LOG_NOTICE, specify program name, print also process PID and print also to standard error, set 'user' type of program, use: </p><div class="fragment"><div class="line">setlogmask (LOG_UPTO (LOG_NOTICE));</div><div class="line">openlog (<span class="stringliteral">&quot;exampleprog&quot;</span>, LOG_PID | LOG_PERROR, LOG_USER);</div></div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">priority</td><td>one of LOG_EMERG, LOG_ALERT, LOG_CRIT, LOG_ERR, LOG_WARNING, LOG_NOTICE, LOG_INFO, LOG_DEBUG </td></tr>
    <tr><td class="paramname">format</td><td>format string as in printf </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated on Tue Jun 9 2020 17:29:32 for CANopenNode by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
  </ul>
</div>
</body>
</html>
